{{ template "layout/header" .}}
<main id="body">
    <div class="container">
        <!-- 手机导航 / Mobile navigation -->
        <div class="btn-group mb-3 d-lg-none" role="group" id="user_mobile_nav">
            <a role="button" class="btn btn-secondary" data-active="menu-user" href="?user-1.htm">个人资料</a>
            <a role="button" class="btn btn-secondary active" data-active="menu-user-thread" href="?user-thread-1.htm">论坛帖子</a>
        </div>
        <div class="row">
            <!-- PC 导航 / Mobile navigation -->
            <div class="col-lg-2 hidden-md hidden-sm" id="user_aside">
                <div class="card">
                    <div class="card-body text-center">
                        <img class="avatar-4" src="{{.userinfo.Avatar}}">
                        <br>{{.userinfo.Username}}
                    </div>
                    <div class="list-group list-group-flush text-center" id="user_nav">
                        <a href="/user/{{.userinfo.ID}}/info.html" class="list-group-item list-group-item-action" data-active="menu-user">个人资料</a>
                        <a href="/user/{{.userinfo.ID}}/thread.html" class="list-group-item list-group-item-action active" data-active="menu-user-thread">论坛帖子</a>
                    </div>
                </div>
            </div>
            <div class="col-lg-10" id="user_main">
                <div class="card">
                    <div class="card-header">
                        <ul class="nav nav-tabs card-header-tabs">
                            <li class="nav-item">
                                <a class="nav-link" href="/user/{{.userinfo.ID}}/thread.html" data-active="user-thread">主题</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link active" href="/user/{{.userinfo.ID}}/post.html" data-active="user-post">帖子</a>
                            </li>
                        </ul>
                    </div>
                    <div class="card-body">
                        <ul class="list-unstyled postlist">

                            {{range .posts}}
                            <li class="media post" data-pid="1" data-uid="1">
                                <a href="?user-1.htm" class="mr-3" tabindex="-1">
                                    <img class="avatar-3" src="{{.Thread.User.Avatar}}">
                                </a>
                                <div class="media-body">
                                    <div class="d-flex justify-content-between small text-muted">
                                        <div>
                                            <span style="padding-bottom:0;margin-bottom:0;color:; ">
                                                <i class="iconfont icon-v1" style="font-size: !important;">
                                                    {{.Thread.User.Group.Name}} </i>
                                            </span>
                                            <span class="username">
                                                <a href="?user-1.htm" class="text-muted font-weight-bold">{{.Thread.User.Username}}</a>
                                            </span>
                                            <span class="date text-grey ml-2">{{.Thread.CreatedAt.Unix | strtime}}</span>
                                        </div>
                                        <div class="text-right text-grey">
                                            <style>
                                            .haya-post-like .haya-post-like-loved {
                                                color: var(--secondary) !important;
                                            }
                                            </style>
                                            <span class="haya-post-like mr-3">
                                                <a href="javascript:;" class="text-muted js-haya-post-like-post-add" data-pid="1" title="点赞回复">
                                                    <i class="icon icon-thumbs-o-up" aria-label="点赞回复"></i>
                                                    <span class="haya-post-like-post-user-count">0</span>
                                                </a>
                                            </span>
                                            <a href="?post-update-1.htm" class="text-grey post_update mr-3"><i class="icon-edit" title="编辑"></i> <span class="d-none">编辑</span></a>
                                            <a data-href="?post-delete-1.htm" data-confirm-text="确定删除吗？" href="javascript:void(0);" class="text-grey post_delete _confirm mr-3"><i class="icon-remove" title="删除"></i> <span class="d-none">删除</span></a>
                                        </div>
                                    </div>
                                    <div class="message mt-1 break-all">
                                        <h6><a href="?thread-1.htm" target="_blank">{{.Thread.Subject}}</a></h6>
                                        <p>{{.Post.Message | unescaped}}</p>
                                    </div>
                                </div>
                            </li>
                            {{end}}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
{{ template "layout/footer" .}}